package com.tianji.learning.controller;


import com.tianji.learning.domain.vo.SignResultVO;
import com.tianji.learning.service.ISignRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 签到记录表 前端控制器
 * </p>
 *
 * @author huanghui
 * @since 2023-07-29
 */
@Api(tags = "签到相关接口")
@RestController
@RequiredArgsConstructor
@RequestMapping("/sign-records")
public class SignRecordController {

    private final ISignRecordService recordService;

    /** @author ZXX-挚爱
    * @Description 签到功能接口
    * @Dete 7:12 2023/7/30
    * @Param []
    * @return com.tianji.learning.domain.vo.SignResultVO
    **/

    @PostMapping
    @ApiOperation("签到功能接口")
    public SignResultVO addSignRecords(){
        return recordService.addSignRecords();
    }

    /** @author ZXX-挚爱
    * @Description 查询签到记录
    * @Dete 8:13 2023/7/30
    * @Param []
    * @return java.lang.Byte[]
    **/

    @GetMapping
    @ApiOperation("查询签到记录")
    public Byte[] querySignRecords(){
        return recordService.querySignRecords();
    }

}
